/*
 * Copyright
 *
 */
package com.fare.taluo.web.action;

import java.util.Comparator;

import com.fare.taluo.vo.plane.HangDuanVo;

/**
 * 【请在此写上此类功能描述文字】
 *
 * @version 
 * @author fangdongyang  2013-1-10 下午2:41:16
 * 
 */
public class ComparatorHangduanVos implements Comparator {
	
	public int compare(Object arg0, Object arg1) {
		HangDuanVo vo1 = (HangDuanVo) arg0;
		HangDuanVo vo2 = (HangDuanVo) arg1;

		// 首先比较日期，如果日期相同，则比较最低价

		int flag = vo1.getFROMCITY().compareTo(vo2.getFROMCITY());
		if (flag == 0) {
			return vo1.getTOCITY().compareTo(vo2.getTOCITY());
		} else {
			return flag;
		}
	}

}
